<ion-view title="员工考勤" hide-back-button="true">
    <ion-nav-buttons side="right">
        <button ng-if="data.flag1" class="button button-clear" ng-click="changeAll()"
                ng-disabled="abnormalDetailInfo.length == 0">
            <i class="icon ion-ios-compose"></i>补考勤
        </button>
    </ion-nav-buttons>

    <ion-header-bar class="bar-subheader my-home-subheader">
        <div class="tab-select">
            <a class="{{data.leftBtn}}" ng-click="getActive(0)">异常</a>
            <a class="{{data.rightBtn}}" ng-click="getActive(1)">全部</a>
        </div>
        <div class="tab-select-date">
            <button class="button button-icon icon ion-ios-arrow-left date-select-slide-left"
                    ng-click="prevMonth()"></button>
            <span class="show-date">{{beginDate}}至{{endDate}}</span>
            <button class="button button-icon icon ion-ios-arrow-right date-select-slide-right"
                    ng-click="nextMonth()"></button>
        </div>
    </ion-header-bar>

    <ion-content class="home-subheader" on-swipe-left="nextMonth()" on-swipe-right="prevMonth()">
        <div ng-show="data.flag1">
            <ion-item class="item-accordion">
                <div class="flow-container">
                    <div class="flow-content">
                        <div class="flow-li">
                            <div class="li-hide-header" style="left:115px;height:28px;"></div>
                        </div>
                        <a ng-repeat="y in abnormalDetailInfo"
                           class="item item-icon-right item-padding-fix items-in-content"
                           style="padding-top:0px;padding-bottom:0px; padding-right:10px; padding-left:0px;"
                           ng-repeat="y in abnormalDetailInfo"
                           on-tap="{{(y.WorkFlowState=='缺勤'||y.WorkFlowState=='迟到'||y.WorkFlowState=='早退')?'getAbnormalDo(y)':'abnormalSingleDi(y)'}}">
                            <div class="flow-li" style="margin-top:0px;margin-bottom:0px;">
                                <div class="item-left"
                                     style="width:140px; display:inline; float:left;">
                                    <p style="width:140px;  padding-left: 5px; ">{{y.Date}}</p>

                                    <p style="width:140px;  padding-left: 5px;">{{y.Result}}({{y.ShiftDef}})</p>
                                </div>
                                <div class="li-triangle-detail"></div>
                                <div class="li-circle"></div>
                                <div class="aa" style="height:70px;">
                                    <i class="item item-icon-right"
                                       style="margin-left:10px;margin:0px; height:40px; border-radius:0px; padding-top:5px;">
                                        <div class="col">
                                                <span style="font-size: 14px" ng-class="{'lack':y.staus==''}">
                                                {{y.sname}}
                                                </span>
                                                <span ng-class="{'lack':y.staus=='','done':y.staus=='(已审批)','todo':y.staus=='(待审批)'}">
                                                    {{y.staus}}
                                                </span>
                                        </div>
                                        <i class="icon ion-ios-arrow-right"
                                           style="margin-right:10px;width:6px;"></i>
                                    </i>
                                </div>
                            </div>
                        </a>

                        <div class="flow-li">
                            <div class="li-hide-footer" style="left:115px;height:80px;z-index:999">
                            </div>
                        </div>
                    </div>
                    <div class="clear"></div>
                </div>
            </ion-item>
        </div>

        <div ng-show="data.flag2">

            <ion-item class="item-accordion" style="background-color: #f7f7f7;">
                <div class="flow-container">
                    <div class="flow-content">
                        <div class="flow-li">
                            <div class="li-hide-header" style="left:115px;height:28px;"></div>
                        </div>
                        <a ng-repeat="y in normalDetailInfo"
                           class="item item-icon-right item-padding-fix items-in-content"
                           style="padding-top:0px;padding-bottom:0px; padding-right:10px; padding-left:0px;"
                           ng-repeat="y in abnormalDetailInfo"
                           on-tap="{{(y.WorkFlowState=='缺勤'||y.WorkFlowState=='迟到'||y.WorkFlowState=='早退')?'getAbnormalDo(y)':'abnormalSingleDi(y)'}}"
                           style="padding-right:0;">
                            <div class="flow-li" style="margin-top:0px;margin-bottom:0px;">
                                <div class="item-left"
                                     style="width:140px; display:inline; float:left;">
                                    <p style="width:140px;  padding-left: 5px; ">{{y.Date}}</p>

                                    <p style="width:140px;  padding-left: 5px;">{{y.Result}}({{y.ShiftDef}})</p>
                                </div>
                                <div class="li-triangle-detail"></div>
                                <div class="li-circle"></div>
                                <div class="aa" style="height:70px;">
                                    <i class="item item-icon-right"
                                       style="margin-left:10px;margin:0px; height:40px; border-radius:0px; padding-top:5px;">
                                        <div class="col" ng-show="y.Result!='正常'">
                                                <span style="font-size: 14px" ng-class="{'lack':y.staus==''}">
                                                {{y.sname}}
                                                </span>
                                                <span ng-class="{'lack':y.staus=='','done':y.staus=='(已审批)','todo':y.staus=='(待审批)'}">
                                                    {{y.staus}}
                                                </span>

                                        </div>
                                        <div class="col" style="color:{{y.Result=='正常'?'#333333':'red'}};">
                                            8:30-17:00
                                        </div>
                                        <i class="icon ion-ios-arrow-right" style="margin-right:10px;width:6px;"
                                           on-tap="{{(y.WorkFlowState=='缺勤'||y.WorkFlowState=='迟到'||y.WorkFlowState=='早退')?'getAbnormalDo(y)':'abnormalSingleDi(y)'}}"></i>
                                    </i>
                                </div>
                            </div>
                        </a>

                        <div class="flow-li">
                            <div class="li-hide-footer"
                                 style="left:115px;height:80px;z-index:999">
                            </div>
                        </div>
                    </div>
                    <div class="clear"></div>
                </div>
            </ion-item>
        </div>
    </ion-content>
</ion-view>